package com.share.thread.pc;

/**
 * @desc: 生产者消费者 基于BlockingQueue方式
 * @author:caifan
 * @date:2022/1/28
 */
public class PC03 {
    public static void main(String[] args) {
        MyBlocking<Integer> queue = new MyBlocking<>(10);
        new Thread(new Producer03(queue)).start();
        new Thread(new Producer03(queue)).start();
        new Thread(new Producer03(queue)).start();
        new Thread(new Consumer03(queue)).start();
        new Thread(new Consumer03(queue)).start();
        new Thread(new Consumer03(queue)).start();
    }
}
